const Mock = require('mockjs')

module.exports = () => Mock.mock({
	"banners|5": [{
		"id": '@id',
		"image": "@image(375x200, @color, banners)",
	}],
	"list|1000": [{
		"image|5-10": ["@image(120x80, @color, item)"],
		"id": "@id",
		"uid|1-20": 1, 
		"title": "@ctitle",
		"desc": "@cword(10, 20)",
		"sku": {
			"size|6": [{
				"name|+1": ['S', 'M', "L", "XL", "XXL", "XXXL"],
				"disabled": "@boolean"
			}],
			"color|7": [{
				"name|+1": ["红色", "白色", "灰色", "蓝色", "绿色", "骚粉", "黄色"],
				"disabled|1": [true, true, true, false]
			}]
		},
		"price|10-1000": 1,
		"commentList|5-10": [{
			"id": "@id",
			"nickname": "@cname",
			"avator": 'https://robohash.org/@id?set=set5',
			"datetime": "@datetime",
			"content": `<div class="content">
							<div class="content-title" style="padding: 10px">
							  @cword(20, 50)
							</div>
							<div class="content-image" >
							  <img src="@image(200x200, @color, image)" alt="" style="margin: 0;padding: 0;width: 32%;">
							  <img src="@image(200x200, @color, image)" alt="" style="margin: 0;padding: 0;width: 32%;">
							  <img src="@image(200x200, @color, image)" alt="" style="margin: 0;padding: 0;width: 32%;">
							</div>
						  </div>`
		}]
	}],
	"tabTitle|20": [{
		"id|+1": 1,
		"title": "@ctitle(2)"
	}],
})
